import {http} from '../utils/http'
// 查询地址列表
export const getAddressListAPI=()=>{
    return http({
        method: 'GET',
        url: '/user/address/list',
    })
}
// 新增地址
export const addAddressAPI=(params)=>{
    return http({
        method: 'POST',
        url: '/user/address',
        data:params,
        header: {
            'content-type': 'application/json'
          }
    })
}
//删除地址
export const deleteAddressAPI=(id)=>{
    return http({
        method: 'DELETE',
        url: `/user/address/${id}`,
    })
}

// 获取地址详情
export const getAddressDetailAPI=(id)=>{
    return http({
        method: 'GET',
        url: `/user/address/${id}`,
    })
}
// 修改地址
export const updateAddressAPI=(id,params)=>{
    return http({
        method: 'PUT',
        url: `/user/address/${id}`,
        data:params,
        header: {
            'content-type': 'application/json'
          }
    })
}



